package com.gyg.controller;


import cn.hutool.json.JSON;
import com.gyg.common.lang.Result;
import com.gyg.entity.File;
import com.gyg.entity.User;
import com.gyg.service.IFileService;
import com.gyg.service.IUserService;
import com.gyg.util.FTPUtil;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.Objects;

/**
 * 测试接口
 */
@RestController
@RequestMapping("/user")
public class UserController {

    private static final Logger log = LoggerFactory.getLogger(UserController.class);

    @Autowired
    IUserService userService;

    @Autowired
    IFileService fileService;



//    /**
//     * @RequiresAuthentication  指定需要登录认证才能进行的请求
//     * @return
//     */
////    @RequiresAuthentication
//    @GetMapping("/index")
//    public Result index(){
//        User user= userService.getById(1L);
//        return Result.success(user);
//    }
//
//    /**
//     * 测试输入数据是否规范的校验
//     * @param user
//     * @return
//     */
//    @GetMapping("/save")
//    public Result save(@Validated @RequestBody User user){
//        return Result.success(user);
//    }

}
